<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>编辑用户信息</title>
    <link rel="stylesheet" href="/css/common.css"> <!-- 引入通用 CSS 文件 -->
    <script>
        function confirmText() {
            return confirm("编辑确认");
        }
    </script>
</head>
<body>
<div class="edit-container">
    <h2>编辑用户信息</h2>
    <form th:action="@{/editUser}" th:object="${user}" method="post">
        <input type="hidden" th:field="*{id}">
        <label for="username">用户名:</label>
        <input type="text" id="username" th:field="*{username}">
        <label for="nickname">昵称:</label>
        <input type="text" id="nickname" th:field="*{nickname}">
        <label for="password">密码:</label>
        <input type="password" id="password" th:field="*{password}">
        <!-- <label for="role">角色:</label> -->
        <!-- <input id="role" th:field="*{role}"> -->
        <button type="submit" onclick="return confirmText()">保存</button>
    </form>
</div>
</body>
</html>